User
Dealing With User Struct
In order to deal with the User and the functionality related to User, we use the User
struct
Here is the User
struct and the attributes related to it
struct User {
id: Int?
name: String?
email: String?
dateOfBirth: String?
gender?: String?
insuranceId: String?
policyNumber: String?
nationalityNumber: String?
height: Double?
weight: Double?
bloodType: String?
smoker: String?
alcoholic: String?
maritalStatus?: String?
createdAt: String?
updatedAt: String?
}
User Functionalities
The following are the functions related to user management:
API | Params |
---|---|
createUser | userData: User |
updateUser | id: Int, userData: User |
getUser | id: Int (required) |
getUsers | page: Int, perPage: Int |
deleteUser | id: Int |